#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    int hammingDistance(int x, int y) {
        int cnt = 0;
        int ret = x ^ y;
        for (int i = 0; i < 32; i++)
        {
            if ((ret >> i) & 1)
                cnt++;
        }
        return cnt;
    }
};